# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=FFI-CheckLib
pkgname=perl-${_realname}
pkgver=0.27
pkgrel=1
pkgdesc="Check that a library is available for FFI"
arch=('any')
url="https://metacpan.org/release/FFI-CheckLib"
groups=('perl-modules')
depends=('perl')
checkdepends=('perl-Test-Exit' 'perl-Test2-Suite')
license=('PerlArtistic')
source=("https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/${_realname}-${pkgver}.tar.gz")
sha256sums=('8d442747c24fcd8560107ed9deb98265838f17bc850cb7237f8b6d4821992d74')

build() {
  cd "${srcdir}/${_realname}-${pkgver}"
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  "${srcdir}/${_realname}-${pkgver}"
  make test
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make install DESTDIR="${pkgdir}"
}
